/*
 * @Author: cola(sunshiwen)
 * @Date: 2022-04-22 10:31:06
 * @LastEditTime: 2022-05-07 17:52:50
 * @LastEditors: cola(sunshiwen)
 * @Description: deployProduct model
 * @FilePath: /maycur-koa/model/deployManage.js
 */
'use strict';
const moment = require('moment');
const Sequelize = require('sequelize');
const { Model } = Sequelize;

const mysql = require('../common/mysql');

class deployProduct extends Model { }
class deployEnv extends Model { }
// 部署产品
deployProduct.init({
    id: {
        type: Sequelize.INTEGER,
        primaryKey: true,
        autoIncrementIdentity: true,
    },
    name: {
        type: Sequelize.STRING,
    },
    code: {
        type: Sequelize.STRING,
    },
}, {
    sequelize: mysql,
    modelName: 'deploy_products',
    timestamps: false,
});
// 部署环境
deployEnv.init({
    id: {
        type: Sequelize.INTEGER,
        primaryKey: true,
        autoIncrementIdentity: true,
    },
    category: {
        type: Sequelize.STRING,
    },
    deployName: {
        type: Sequelize.STRING,
    },
    deployLink: {
        type: Sequelize.TEXT,
    },
    env: {
        type: Sequelize.STRING,
    },
}, {
    sequelize: mysql,
    modelName: 'deploy_envs',
    timestamps: false,
});

module.exports = {
    deployProduct,
    deployEnv,
};